Esempio di procedura che usa il DLOG Manager.

/***
 *

help();
 *
 *

mostra l'help DLOG. 
 *

(helpDialog = 132, helpDLOGDescr = 132)
 *
 ***/
void CgestisciDLOGDati::help(void)

DialogPtr

helpDialog;

CgestisciDLOGDati
helpDLOG;

EventRecord

event;

short

itemHit, pos;

Boolean

status;

helpDialog = GetNewDialog(helpDLOGID, NULL, (WindowPtr)-1L);

if (helpDialog != NULL && !helpDLOG.IgestisciDLOGDati(helpDialog, helpDLOGDescr))

helpDLOG.disableAboutDLOG = true;

 
do

 

helpDLOG.idle();

 

GetNextEvent(everyEvent, &event);

 

itemHit = helpDLOG.gestEvent(&event);

//
gestisce i keyDown & equivalent

 

if (itemHit == -1 && IsDialogEvent(&event))

 

 

DialogSelect(&event, &helpDialog, &itemHit);

 

helpDLOG.itemSelect(&event, itemHit, &pos, &status);

// gestisce l'item

 

 

if (itemHit == okhelpDLOGitem)

break;

 

 

while(true);

 

helpDLOG.Dispose();

 DisposDialog(helpDialog);

else if (helpDialog != NULL)

 

DisposDialog(helpDialog);